package quattrow;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;

public class Vars {

    private static String Version = "Quattro W - 0.01-00";
    private static String HostID = "";

    public static String getVersion() {
        return Version;
    }

    public static void setHostID(String HostID) {
        Vars.HostID = HostID;
    }

    public static String getHostID() {
        return Vars.HostID;
    }
    //
    // Properties
    /*
     *
     * Username Userpass DB_URL
     *
     */
    public static Properties prop = new Properties();
    public static String PropFileName = "";
    public static String PropPath = "";

    public static void SaveProperties() {
        try {
            prop.storeToXML(new FileOutputStream(PropFileName, false), null);
        } catch (IOException ex) {
            Logger.getLogger(Vars.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public static void LoadProperties() {
        try {
            Vars.prop.loadFromXML(new FileInputStream(PropFileName));
        } catch (IOException ex) {
            Logger.getLogger(Vars.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
